package com.jx.medical.service.impl;

import com.jx.medical.mapper.QueryMapper;
import com.jx.medical.pojo.*;
import com.jx.medical.service.QueryService;
import com.jx.medical.vo.MedicineTable;
import com.jx.medical.vo.ShowInRecord;
import com.jx.medical.vo.ShowOutRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import sun.nio.cs.ArrayEncoder;

import java.util.List;

/**
 * @author jx
 * @date Created on 2020/12/4  10:32
 **/
@Service
public class QueryServiceImpl implements QueryService {
    @Autowired
    private QueryMapper queryMapper;
    @Override
    public List<Medicine> queryMedicine() {
        List<Medicine> medicines = queryMapper.queryMedicine();
        return medicines;
    }

    @Override
    public List<Factory> queryFactory() {
        List<Factory> factories = queryMapper.queryFactory();
        return factories;
    }

    @Override
    public List<Buyer> queryBuyer() {
        List<Buyer> buyers = queryMapper.queryBuyer();
        return buyers;
    }

    @Override
    public List<ShowInRecord> getInRecord(MedicineTable medicineTable) {
        List<ShowInRecord> inRecord = queryMapper.getInRecord(medicineTable);
        return inRecord;
    }

    @Override
    public List<ShowOutRecord> getOutRecord(MedicineTable medicineTable) {
        List<ShowOutRecord> outRecord = queryMapper.getOutRecord(medicineTable);
        return outRecord;
    }

    @Override
    public int getInRecordCount(MedicineTable medicineTable) {
        int inRecordCount = queryMapper.getInRecordCount(medicineTable);
        return inRecordCount;
    }

    @Override
    public int getOutRecordCount(MedicineTable medicineTable) {
        int outRecordCount = queryMapper.getOutRecordCount(medicineTable);
        return outRecordCount;
    }

    @Override
    public int queryMedicineByNameCount(MedicineTable medicineTable) {
        int i = queryMapper.queryMedicineByNameCount(medicineTable);
        return i;
    }


    @Override
    public List<Medicine> queryMedicineByName(MedicineTable medicineTable) {
        List<Medicine> medicines = queryMapper.queryMedicineByName(medicineTable);
        return medicines;
    }

    @Override
    public int queryFactoryByNameCount(MedicineTable medicineTable) {
        int i = queryMapper.queryFactoryByNameCount(medicineTable);
        return i;
    }

    @Override
    public List<Factory> queryFactoryByName(MedicineTable medicineTable) {
        List<Factory> factories = queryMapper.queryFactoryByName(medicineTable);
        return factories;
    }

    @Override
    public int queryBuyerByNameCount(MedicineTable medicineTable) {
        int i = queryMapper.queryBuyerByNameCount(medicineTable);
        return i;
    }

    @Override
    public List<Buyer> queryBuyerByName(MedicineTable medicineTable) {
        List<Buyer> buyers = queryMapper.queryBuyerByName(medicineTable);
        return buyers;
    }

    @Override
    public int queryUserByNameCount(MedicineTable medicineTable) {
        int i = queryMapper.queryUserByNameCount(medicineTable);
        return i;
    }

    @Override
    public List<User> queryUserByName(MedicineTable medicineTable) {
        List<User> users = queryMapper.queryUserByName(medicineTable);
        return users;
    }


}
